<?php

/**
 * ActiveRecordUser class
 *
 * @author Julot
 * @since Friday, May 25, 2012. 12:32 PM
 */
class ActiveRecordUser extends ActiveRecord {

	public function behaviors() {
		$behaviors = parent::behaviors();
		$userBehavior = array(
			'class'=>'zii.behaviors.CTimestampBehavior',
			'createAttribute'=>'createdBy',
			'updateAttribute'=>'updatedBy',
			'setUpdateOnCreate'=>true,
			'timestampExpression'=>"Yii::app()->user->id",
		);
		$behaviors['UserBehavior'] = $userBehavior;
		return $behaviors;
	}

}
